package com.hadoop.controller;

import com.hadoop.common.JodaDateEditor;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

import java.util.Date;

/**
 * <p></p>
 *
 * @author Andy
 * @date 2017/10/12
 */
public class BaseController {

    @InitBinder
    protected void databind(WebDataBinder dataBinder) {
        dataBinder.registerCustomEditor(Date.class, new JodaDateEditor());
    }
}
